#ifndef __GND_SERVICE_APPMANAGER_H__
#define __GND_SERVICE_APPMANAGER_H__
#include <memory>
#include <list>
#include <sigc++/slot.h>
#include <gdkmm/pixbuf.h>

#include "Service.h"
#include "Global.h"

namespace Gnodroid {

    class ServiceAppmanager :
        public Service
    {
    public:
        ServiceAppmanager();
        void start();
        void stop();

        void
        getAppList(sigc::slot<void, bool,
                            std::shared_ptr<std::list<AndroidApp>>/*user*/,
                            std::shared_ptr<std::list<AndroidApp>>/*system*/ > slotCb);
        void
        getAppIcons(std::shared_ptr<std::list<AndroidApp>> appList,
                    sigc::slot<void, bool, std::shared_ptr<std::list<AndroidApp>> > slotCb);
    protected:
    private:

        void
        __getAppListThread(sigc::slot<void, bool,
                           std::shared_ptr<std::list<AndroidApp>>/*user*/,
                           std::shared_ptr<std::list<AndroidApp>>/*system*/ > slotCb);
        void
        __getAppIconsThread(std::shared_ptr<std::list<AndroidApp>> appList,
                            sigc::slot<void, bool, std::shared_ptr<std::list<AndroidApp>> > slotCb);
    };
}


#endif
